package com.twu.biblioteca;

import java.io.*;

public class BibliotecaApp {

    private final PrintStream printStream;
    private Library library;
    private Menu menu;

    public BibliotecaApp(PrintStream printStream, Library library, Menu menu) {
        this.printStream = printStream;
        this.library = library;
        this.menu = menu;
    }

    public void start() throws IOException {
        printWelcome();
        library.printBooks();
        menu.print();
        String menuChoice = menu.getChoice();
        menu.implementChoice(menuChoice);

    }

    private void printWelcome() {
        printStream.println("Welcome to Biblioteca!\n");

    }

}
